/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trefliq.EJB.webservice;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import trefliq.EJB.entities.OrdersItem;
import trefliq.EJB.sessionbeans.OrdersItemSession;

/**
 *
 * @author eric
 */
//@WebService(serviceName = "OrdersItemWebService")
@Stateless()
public class OrdersItemWebService {
    @EJB
    private OrdersItemSession ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "getAllOrdersItems")
    public List<OrdersItem> getAllOrdersItems() {
        return ejbRef.getAllOrdersItems();
    }

    @WebMethod(operationName = "findOrdersItemById")
    public OrdersItem findOrdersItemById(@WebParam(name = "orderstitemid") Long orderstitemid) {
        return ejbRef.findOrdersItemById(orderstitemid);
    }

    @WebMethod(operationName = "deleteOrdersItem")
    public OrdersItem deleteOrdersItem(@WebParam(name = "ordersitem") OrdersItem ordersitem) {
        return ejbRef.deleteOrdersItem(ordersitem);
    }

    @WebMethod(operationName = "editOrdersItem")
    public OrdersItem editOrdersItem(@WebParam(name = "ordersitem") OrdersItem ordersitem) {
        return ejbRef.editOrdersItem(ordersitem);
    }

    @WebMethod(operationName = "createOrdersItem")
    public OrdersItem createOrdersItem(@WebParam(name = "ordersitem") OrdersItem ordersitem) {
        return ejbRef.createOrdersItem(ordersitem);
    }
    
    @WebMethod(operationName = "deleteAll")
    @Oneway
    public void deleteAll() {
        ejbRef.deleteAll();
    }
    
}
